package com.wwtech.epp.ui.activity.work;

import android.os.Bundle;

import com.wwtech.epp.R;
import com.wwtech.epp.application.AppConfig;
import com.wwtech.epp.base.BaseActivity;
import com.wwtech.epp.ui.activity.work.component.DaggerLeaveComponent;
import com.wwtech.epp.ui.activity.work.contract.LeaveContract;
import com.wwtech.epp.ui.activity.work.module.LeaveModule;
import com.wwtech.epp.ui.activity.work.presenter.LeavePresenter;

import javax.inject.Inject;

import butterknife.ButterKnife;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: $description请假
 * @date 2017/08/31 22:20:02
 */

public class LeaveActivity extends BaseActivity implements LeaveContract.View {

    @Inject
    LeavePresenter mPresenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initView() {
        setContentView(R.layout.activity_leave);
        ButterKnife.bind(this);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }

    @Override
    protected void initData() {
        setTitle("请假");
    }

    @Override
    protected void setupActivityComponent() {
       DaggerLeaveComponent
               .builder()
               .appComponent(((AppConfig) getApplication()).getApplicationComponent())
               .leaveModule(new LeaveModule(this))
               .build()
               .inject(this);
    }
    @Override
    public void setPresenter(LeaveContract.LeaveContractPresenter presenter) {
        mPresenter = (LeavePresenter) presenter;
    }

    @Override
    public void showProgressDialog() {
        progressDialog.show();
    }

    @Override
    public void closeProgressDialog() {
        progressDialog.hide();
    }

}